<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        Hello, #{userMainPageController.user.nickname}!
        <h1>Project</h1>
        <h:form>
            <h:selectOneMenu value="#{userMainPageController.currentProjectID}" onchange="submit()">
                <f:selectItems value="#{userMainPageController.user.projectList.toArray()}" var="p"
                               itemLabel="#{p.title}" itemValue="#{p.id}"/>
            </h:selectOneMenu>
            <h:selectManyCheckbox value="#{userMainPageController.checkedEmployees}">
                    <f:selectItems value="#{userMainPageController.currentProject.employeeList}"
                                   var="e" itemValue="#{e.id}" itemLabel="#{e.firstName}"/>
            </h:selectManyCheckbox>
        </h:form>
    </h:body>
</html>

